class Weekly < ActiveRecord::Base
  establish_connection :weekly
  has_many :weekly_results, :dependent => :destroy
  belongs_to :last, :foreign_key => :parent_id, :class_name => 'Weekly'

  def self.latest
      find :first, :order => '"index" desc' 
  end
end
